package com.vastcom.sigma.admin.model;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Date;

@Entity
public class Upb {
    private String upblockchainid;
    private String key;
    private Date sj;

    @Id
    @Column(name = "upblockchainid")
    public String getUpblockchainid() {
        return upblockchainid;
    }

    public void setUpblockchainid(String upblockchainid) {
        this.upblockchainid = upblockchainid;
    }

    @Basic
    @Column(name = "key")
    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    @Basic
    @Column(name = "sj")
    public Date getSj() {
        return sj;
    }

    public void setSj(Date sj) {
        this.sj = sj;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Upb upb = (Upb) o;

        if (upblockchainid != null ? !upblockchainid.equals(upb.upblockchainid) : upb.upblockchainid != null)
            return false;
        if (key != null ? !key.equals(upb.key) : upb.key != null) return false;
        if (sj != null ? !sj.equals(upb.sj) : upb.sj != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = upblockchainid != null ? upblockchainid.hashCode() : 0;
        result = 31 * result + (key != null ? key.hashCode() : 0);
        result = 31 * result + (sj != null ? sj.hashCode() : 0);
        return result;
    }
}
